#!
while true; do
	du `pwd` -s > temp.txt
	size=`awk '{ print $1 }' ./temp.txt`
	safe_rm temp.txt

	if [ $(echo "$size > $1" | bc) -ne 0 ]; then
		ls -ltr | grep _bak | head -1 > folder.txt
		folder=`awk '{ print $9 }' ./folder.txt`
		safe_rm -rf "$folder"
		safe_rm folder.txt
	fi
	sleep 60
done
